package com.sj.uabrowser.mvp.main.view.adp;

import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.PagerAdapter;

import java.util.List;

public class MyCustomPagerAdapter extends FragmentPagerAdapter {

    List<Fragment> fragments;


    public MyCustomPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int i) {
        return fragments.get(i);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

    @Override
    public int getItemPosition(@NonNull Object object) {
        return PagerAdapter.POSITION_NONE;
    }

    //    @Override
//    public CharSequence getPageTitle(int position) {
//        return fragments.get(position).getArguments().getString("title");
//    }


}
